﻿<KCtl:BasePhoneApplicationPage 
    x:Class="Kiva7.Pages.FriendEditPage"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:KCtl="clr-namespace:Kiva7.Controls"
    FontFamily="{StaticResource PhoneFontFamilyNormal}"
    FontSize="{StaticResource PhoneFontSizeNormal}"
    Foreground="{StaticResource PhoneForegroundBrush}"
    SupportedOrientations="PortraitOrLandscape" Orientation="Portrait"
    mc:Ignorable="d" d:DesignHeight="696" d:DesignWidth="480"
    shell:SystemTray.IsVisible="True" Loaded="BasePhoneApplicationPage_Loaded">

    <!--LayoutRoot is the root grid where all page content is placed-->
    <Grid x:Name="LayoutRoot" Background="Transparent">
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="*"/>
        </Grid.RowDefinitions>

        <!--TitlePanel contains the name of the application and page title-->
        <StackPanel x:Name="TitlePanel" Grid.Row="0" Margin="12,17,0,5">
            <TextBlock x:Name="ApplicationTitle" Text="Kiva7" Style="{StaticResource KivaTextNormalStyle}"/>
            <TextBlock x:Name="PageTitle" Text="{Binding Path=L.EditAFriend, Source={StaticResource L}}" Margin="-3,-8,0,0" 
                       Style="{StaticResource KivaTextTitle1Style}"/>
        </StackPanel>

        <StackPanel Grid.Row="1">

            <TextBlock Text="{Binding L.LenderID, Source={StaticResource L}}"  
                               Style="{StaticResource KivaTextNormalStyle}"
                               Visibility="{Binding LenderId, Converter={StaticResource stringVisibility}}" />
            <TextBox x:Name="LenderID" TextChanged="LenderID_TextChanged" ></TextBox>

            
        </StackPanel>

        <StackPanel Grid.Row="2"
                    DataContext="{Binding SingleData}"
                    x:Name="Lender">

            <TextBlock Text="{Binding L.Name, Source={StaticResource L}}"  
                               Style="{StaticResource KivaTextNormalStyle}"
                               Visibility="{Binding Name, Converter={StaticResource stringVisibility}}" />
            <TextBlock Text="{Binding Name}" 
                               Style="{StaticResource KivaTextAccentStyle}"
                               TextWrapping="Wrap"/>

            <TextBlock Text="{Binding L.MemberSince, Source={StaticResource L}}"  Style="{StaticResource KivaTextNormalStyle}"/>
            <TextBlock Text="{Binding MemberSince, Converter={StaticResource toShortDate}}" 
                           Style="{StaticResource KivaTextAccentStyle}"
                       Visibility="{Binding MemberSince, Converter={StaticResource dateTimeVisibility}}"
                           TextWrapping="Wrap"/>
            <TextBlock Text="{Binding L.WhereAbouts, Source={StaticResource L}}"  Style="{StaticResource KivaTextNormalStyle}"
                       Visibility="{Binding WhereAbouts, Converter={StaticResource stringVisibility}}" />
            <TextBlock Text="{Binding WhereAbouts}" 
                           Visibility="{Binding WhereAbouts, Converter={StaticResource stringVisibility}}"
                           Style="{StaticResource KivaTextAccentStyle}"
                           TextWrapping="Wrap"/>

            <TextBlock Text="{Binding L.Occupation, Source={StaticResource L}}"  Style="{StaticResource KivaTextNormalStyle}"
                       Visibility="{Binding Occupation, Converter={StaticResource stringVisibility}}" />
            <TextBlock Text="{Binding Occupation}" 
                           Visibility="{Binding Occupation, Converter={StaticResource stringVisibility}}"
                           Style="{StaticResource KivaTextAccentStyle}"
                           TextWrapping="Wrap"
                       />
        </StackPanel>


    </Grid>
    <KCtl:Bindable.ApplicationBar>
        <KCtl:BindableApplicationBar IsVisible="True" IsMenuEnabled="True" >

        </KCtl:BindableApplicationBar>
    </KCtl:Bindable.ApplicationBar>
</KCtl:BasePhoneApplicationPage>
